﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Windows.Forms;

namespace ElectronicWMSA.Comm.ClassFiles
{
    public class ErrorLogLoad
    {
        /// <summary>
        /// error
        /// </summary>
        /// <param name="info">Message</param>
        public static void ErrorLogInfo(string info)
        {
            string ErrPath = AppDomain.CurrentDomain.BaseDirectory;
            if (!Directory.Exists(ErrPath))
            {
                Directory.CreateDirectory(ErrPath);
            }
            using (StreamWriter sw = new StreamWriter(Application.StartupPath + "\\Log.txt", true))
            {
                sw.WriteLine(info);
                sw.WriteLine("---------------------------------------------------------");
                sw.Close();
            }
        }
    }
}
